home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / X_USE.HDR < prev    next >
Text File  |  1994-04-25  |  2KB  |  61 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _XUse( cFile, cAlias, nArea, nSecs ) --> lError
  8.  
  9. PARAMETERS:
  10.  
  11. cFile  : File to Open
  12. cAlias : Alias To Open Under
  13. cArea  : Work Area Number to Open in
  14. nSecs  : Seconds to wait before fail
  15.  
  16. SHORT:
  17.  
  18. General Purpose EXCLUSIVE file opener.
  19.  
  20. DESCRIPTION:
  21.  
  22. _XUse() is a general purpose network file open function. It attempts to open
  23. a database file for EXCLUSIVE use.
  24.  
  25. By default, it employs a "wait-forever" approach in that it will not
  26. return until it has secured the file in exclusive mode.  To change
  27. this, specify the number of seconds to wait before an open fail is assumed.
  28.  To wait forever, either specify 0 for nSecs, or nothing (ie, NIL).
  29.  
  30. If the cAlias is not specified, the file name is used as the alias.  If
  31. the file begins with a digit, it is removed ( aliases cannot begin with
  32. a digit) and an "A" is put in it's place.  Be careful, because 1DATA.DBF
  33. and 2DATA.DBF would therefore both be opened as "ADATA".
  34.  
  35. Also, any non alphabetic characters are removed and not replaced
  36. with anything.
  37.  
  38. NOTE:
  39.  
  40. cArea is a work are NUMBER.  If it is not specified, then the database
  41. is opened in the CURRENT area CLOSING whatever is open in that area.  To
  42. open in the first unused work area, specify 0 (zero) for cArea.  The file
  43. will be opened in that area and that area will become the current work area.
  44.  
  45. _XUse() respects the setting of the DOS Environment variable _KFILEPATH,
  46. if present.  See KLIPPER.DOC for details on DOS Environment variables.
  47.  
  48. EXAMPLE:
  49.  
  50. _XUse('BUDGET','BUDGET',5)
  51.  
  52. Result: If available, BUDGET is opened for EXCLUSIVE mode in work area 5
  53.  
  54.  
  55. _XUse('BUDGET','BUDGET',select(0))
  56.  
  57. Result: If available, BUDGET is opened for EXCLUSIVE mode in the first
  58. unused work area.
  59.  
  60. ******************************************************************************/
  61.